<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改物流信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-transInfo-edit" th:object="${transInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">物流单号：</label>
                <div class="col-sm-8">
                    <input name="transInfoId" th:field="*{transInfoId}" class="form-control" type="text" required>
                </div>
            </div>
           <!-- <div class="form-group">
                <label class="col-sm-3 control-label">物流状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}">
                        <input type="radio" th:id="${'transInfoStatus_' + dict.dictCode}" name="transInfoStatus" th:value="${dict.dictValue}" th:field="*{transInfoStatus}">
                        <label th:for="${'transInfoStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">物流信息：</label>
                <div class="col-sm-8">
                    <input name="transInfoContent" th:field="*{transInfoContent}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单编号：</label>
                <div class="col-sm-8">
                    <input name="orderId" th:field="*{orderId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户代码：</label>
                <div class="col-sm-8">
                    <input name="customerId" th:field="*{customerId}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "bus/transInfo";
        $("#form-transInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            var id = $("#id").val();
            var url = "";
            if (id == "") {
                url = prefix + "/add";
            } else {
                url = prefix + "/edit";
            }
            if ($.validate.form()) {
                $.operate.save(url,  $('#form-transInfo-edit').serialize());
            }
        }
    </script>
</body>
</html>